<?php
if(!empty($filename)):
?>
<h3>Your benchmarks were successfully generated</h3>
<p>Click on the link below to download a zip archive of the benchmark files</p>
<div id="dlLinkContainer">
	<div id="dlLink">
		<a href="<?php echo $this->webroot.'benchmarks/'.$filename.".zip" ?>">test-SEQ-20100524040539.zip</a>
	</div>
</div>
<span class="labelText">The zip archive follows the following naming convention - project name as entered by you _ SEQ (for sequential) _ timestamp (year,month,day,hour(24 hr format),minutes,seconds)<br/>The timestamp is used to prevent overwriting a file with the same name</span>
<br/><br/><br/><br/>
<?php echo $html->link('Generate More BenchMarks', array('controller' => 'projects', 'action' => 'generateTest')) ?>
<?php else: ?>
<h2>Generate Benchmarks</h2>
<?php echo $form->create(null, array('url' => array('controller' => 'projects', 'action' => 'generateTest'))); ?>
	<h3>Project Info</h3>
	<p>
		<label for="ProjectTitle">Title</label>
		<span class="labelText">Enter a name for the project</span>
		<input type="text" name="data[title]" value="" id="ProjectTitle" size="30" maxlength="255" />
	</p>
	<h3>Program Generation Model</h3>
	<p>
		Choose program structure
	</p>
	<span class="labelText">This option determines how the kernels are combined to generate the required files<br/>Currently only the Sequential Model is supported, other options are disabled</span>
	<table>
		<tr>
			<td style="vertical-align:middle;text-align:center"><input type="radio" name="data[model]" value="1" id="" checked="checked" /></td>
			<td style="text-align:left">Kernel Sequence Model</td>
		</tr>
		<tr>
			<td style="vertical-align:middle;text-align:center"><input type="radio" name="data[model]" value="2" id="" disabled="disabled" /></td>
			<td style="text-align:left">Kernel Sequence Function Model</td>
		</tr>
		<tr>
			<td style="vertical-align:middle;text-align:center"><input type="radio" name="data[model]" value="3" id="" disabled="disabled" /></td>
			<td style="text-align:left">Kernel Sequence Function Minimum Size Model</td>
		</tr>
		<tr>
			<td style="vertical-align:middle;text-align:center"><input type="radio" name="data[model]" value="4" id="" disabled="disabled" /></td>
			<td style="text-align:left">Loop Select Minimum Size Model</td>
		</tr>
		<tr>
			<td style="vertical-align:middle;text-align:center"><input type="radio" name="data[model]" value="5" id="" disabled="disabled" /></td>
			<td style="text-align:left">Adjustable Size Loop Select Model</td>
		</tr>
	</table>
	

	<h3>Project Parameters</h3>
	<p>
		BenchMaker can generate a sequence of programs based on your inputs below
	</p>
	<br/>
	<label>Unit</label>
	<span class="labelText">Choose the unit of measurement, the generated files can be measured in terms of lines of code or number of kernels</span>
	<table>
		<tr>
			<td style="vertical-align:middle; text-align:center"><input type="radio" name="data[unit]" value="1" id="" checked="checked" /></td>
			<td style="text-align:left">Lines of Code</td>
		</tr>
		<tr>
			<td style="vertical-align:middle; text-align:center"><input type="radio" name="data[unit]" value="2" id="" /></td>
			<td style="text-align:left">Kernels</td>
		</tr>
	</table>
	<label>Min </label>
	<span class="labelText">Enter the required number of lines in the smallest file</span>
	<input type="text" name="data[min]" value="" id="minLOC" size="5"/>
	<br/><br/>
	<label>Max </label>
	<span class="labelText">Enter the required number of lines in the largest file</span>
	<input type="text" name="data[max]" value="" id="maxLOC" size="5"/>
	<br/><br/>
	<label>Step </label>
	<span class="labelText">Enter the step size, this value will be added to MIN until MAX is reached</span>
	<input type="text" name="data[step]" value="" id="LOCSTEP" size="5"/>
	<br/>
	<br/>

<?php echo $form->end('Generate'); ?>
<span class="labelText">After clicking generate, you will be taken to the page where you can download the generated benchmarks. Please wait while the benchmarks are being generated.</span>

<?php endif; ?>